const KoaRouter = require("koa-router");
const { verifyUser, handlePassword } = require("../middleware/user.middleware");
const { create } = require("../controller/user.controller");

const userRouter = new KoaRouter({ prefix: "/users" });

// 注册用户
userRouter.post("/", verifyUser, handlePassword, create);

userRouter.get("/bar", function (ctx, next) {
  ctx.body = "this is a users/bar response";
});

module.exports = userRouter;
